/* 用户中心布局样式 */
.user-center-layout {
  display: flex;
  position: relative;
  min-height: calc(100vh - 64px); /* 减去MainLayout头部高度 */
  background-color: #f5f5f5;
}

/* 侧边栏样式 */
.user-sidebar {
  width: 250px;
  background-color: white;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  padding: 25px 0;
  position: fixed;
  left: 0;
  top: 64px; /* MainLayout头部高度 */
  height: calc(100vh - 64px);
  transition: all 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.user-sidebar.open {
  transform: translateX(0);
}

.user-sidebar.closed {
  transform: translateX(-220px);
}

.sidebar-title {
  font-size: 1.4rem;
  color: #333;
  margin: 0 0 20px;
  padding: 0 25px 15px;
  border-bottom: 1px solid #eee;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  padding: 12px 25px;
  color: #555;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.sidebar-btn:hover {
  background-color: #f8f8f8;
  color: #333;
}

.sidebar-btn.active {
  background-color: #fff8dd;
  color: #000;
  font-weight: 500;
  border-left: 3px solid #ffd600;
}

.sidebar-btn i {
  margin-right: 10px;
  font-size: 1.1rem;
}

.stat-icon {
  margin-right: 10px;
  font-size: 1.1rem;
}

.logout-btn {
  color: #ff6b6b;
  margin-top: 20px;
}

.logout-btn:hover {
  background-color: #fff0f0;
}

/* 内容区域 */
.user-content-area {
  flex: 1;
  padding: 30px;
  margin-left: 250px; /* 与侧边栏宽度相同 */
  transition: margin-left 0.3s ease;
  min-height: calc(100vh - 64px);
  max-width: 1200px;
}

.user-content-area.sidebar-closed {
  margin-left: 70px;
}

/* 侧边栏切换按钮 - 只在移动端显示 */
.sidebar-toggle {
  position: fixed;
  top: 80px; /* MainLayout头部下方 */
  left: 15px;
  width: 40px;
  height: 40px;
  background-color: #ffd600;
  color: #222;
  border-radius: 50%;
  z-index: 1001;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background-color: #ffed4e;
  transform: scale(1.05);
}

/* 侧边栏遮罩 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 998;
}

/* 简单的图标样式 */
.icon-user:before {
  content: "👤";
}

.icon-key:before {
  content: "🔑";
}

.icon-invitation:before {
  content: "📧";
}

.icon-logout:before {
  content: "🚪";
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-center-layout {
    min-height: calc(100vh - 56px); /* 移动端头部高度较小 */
  }

  .user-sidebar {
    position: fixed;
    top: 56px; /* 移动端MainLayout头部高度 */
    left: -250px;
    height: calc(100vh - 56px);
    z-index: 1000;
    transform: translateX(0);
    box-shadow: none;
  }
  
  .user-sidebar.open {
    transform: translateX(250px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .user-content-area {
    padding: 20px 15px;
    margin-left: 0;
    width: 100%;
    min-height: calc(100vh - 56px);
  }
  
  .user-content-area.sidebar-closed {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    top: 70px;
  }
}

/* PC端隐藏切换按钮的样式已经通过条件渲染实现 */
@media (min-width: 769px) {
  .user-sidebar.closed {
    transform: translateX(-180px); /* PC端收起时不完全隐藏 */
  }
  
  .user-content-area.sidebar-closed {
    margin-left: 70px; /* PC端收起时保留一定间距 */
  }
} 